<template>
    <div>
      我是新的按钮要用的添加的组件哦
      <button @click="test">是否显示</button>
      <div v-if="visibilityTest"
           style="position:fixed;z-index:9999;width: 500px;height: 300px;background: red;"></div>
    </div>
</template>

<script>
export default {
  name: 'add-button',
  data () {
    return {
      visibilityTest: false
    }
  },
  created () {
    console.log(this.Editor)
    // 关闭弹出层是执行
    window.addEventListener('message', (event) => {
      console.log(event)
      console.log('收到信息了')
    })
  },
  methods: {
    test () {
      this.visibilityTest = !this.visibilityTest
    }
  }
}
</script>

<style scoped>

</style>
